<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>事件</title>
		
		<style type="text/css">
			
			#div1{
				background-image:   url(../../img/QQ截图20200929093137.png) ;
				width: 300px;
				height: 300px;
				border: black solid 1px;
			}
			
		</style>
		
		
		
		
	</head>
	<body>
		
		<div id="div1">
			
		</div>
		
	</body>
	
		<script type="text/javascript">
			var div1=document.getElementById("div1");
			div1.onmouseenter=function(){
				alert("已进入");
			}
			div1.onmouseleave=function(){
				alert("鼠标指针移除事件");
			}
			// div1.onmousemove=function(){
			// 	alert("鼠标指针移动事件");
			// }
			
			
		</script>
		
	
	
</html>
